﻿<?xml version="1.0" encoding="utf-8" ?>

<cls:class
	name="InternetAddress"
	type="http://metalx.org/Network/Internet/InternetAddress"
	xmlns="http://metalx.org/Program"
	xmlns:cls="http://metalx.org/Class"
	xmlns:obj="http://metalx.org/i386/Functions/Object"
	xmlns:hex="http://metalx.org/i386/Functions/Hexadecimal"
	xmlns:lst="http://metalx.org/i386/Functions/List"
	xmlns:str="http://metalx.org/i386/Functions/String"
	xmlns:mm="http://metalx.org/i386/Functions/MemoryManager"
	xmlns:clsf="http://metalx.org/i386/Functions/Class"
	xmlns:var="http://metalx.org/Variable"
	xmlns:sys="http://metalx.org/i386/Functions/System"
	xmlns:net="http://metalx.org/i386/Functions/Network"
	xmlns:cat="http://metalx.org/i386/Functions/Catalog"
	xmlns:asc="http://metalx.org/Ansi/Ascii"
	xmlns:ari="http://metalx.org/Intel/80386/Arithmetic"
	xmlns:math="http://metalx.org/Intel/80386/Math"
	xmlns:shift="http://metalx.org/Intel/80386/Shift"
	xmlns:cpu="http://metalx.org/Intel/80386/Operators"
	xmlns:op="http://metalx.org/Intel/80386/Operands">

	<cls:field name="Value" type="http://metalx.org/Network/Internet/InternetAddress" offset="0"/>

	<cls:method name="Create" type="http://metalx.org/Network/Internet/InternetAddress" static="true">
		<cls:parameter name="value1" type="http://metalx.org/Byte"/>
		<cls:parameter name="value2" type="http://metalx.org/Byte"/>
		<cls:parameter name="value3" type="http://metalx.org/Byte"/>
		<cls:parameter name="value4" type="http://metalx.org/Byte"/>

		<cpu:CopyOperandToRegister/>
		<op:SI-BPAddressPlusImmediate8/>
		<byte>0</byte>

		<obj:GetData/>

		<cpu:CopyOperandToRegister8/>
		<op:AL-SIAddress/>

		<cpu:ShiftRegisterByImmediate8Function/>
		<shift:ShiftAXRegisterLeft/>
		<byte>8</byte>

		<cpu:CopyOperandToRegister/>
		<op:SI-BPAddressPlusImmediate8/>
		<byte>4</byte>

		<obj:GetData/>

		<cpu:CopyOperandToRegister8/>
		<op:AL-SIAddress/>

		<cpu:ShiftRegisterByImmediate8Function/>
		<shift:ShiftAXRegisterLeft/>
		<byte>8</byte>

		<cpu:CopyOperandToRegister/>
		<op:SI-BPAddressPlusImmediate8/>
		<byte>8</byte>

		<obj:GetData/>

		<cpu:CopyOperandToRegister8/>
		<op:AL-SIAddress/>

		<cpu:ShiftRegisterByImmediate8Function/>
		<shift:ShiftAXRegisterLeft/>
		<byte>8</byte>

		<cpu:CopyOperandToRegister/>
		<op:SI-BPAddressPlusImmediate8/>
		<byte>12</byte>

		<obj:GetData/>

		<cpu:CopyOperandToRegister8/>
		<op:AL-SIAddress/>

		<mm:CheckOut length="4"/>

		<cpu:CopyRegisterToOperand/>
		<op:AX-DIAddress/>

		<obj:Create length="4"/>

		<cpu:MathImmediate8ToOperandFunction/>
		<math:AddToBPRegister/>
		<byte>16</byte>

		<cpu:ReturnToNearCaller/>
	</cls:method>

	<cls:method name="ToString" type="http://metalx.org/String">
		<cpu:CopyRegisterToOperand/>
		<op:DI-SIRegister/>

		<obj:GetData/>

		<cpu:CopyOperandToRegister/>
		<op:AX-SIAddress/>
		
		<net:GetInternetAddress/>

		<str:CreateObject/>

		<cpu:ReturnToNearCaller/>
	</cls:method>

	<cls:method name="GetClass" type="http://metalx.org/Class">
		<cpu:CopyRegisterToOperand/>
		<op:DI-SIRegister/>

		<obj:GetType/>

		<cpu:CopyRegisterToOperand/>
		<op:SI-DIRegister/>

		<clsf:CreateObject/>

		<cpu:ReturnToNearCaller/>
	</cls:method>

	<cls:method name="GetClass" type="http://metalx.org/Class" static="true">
		<cpu:CopyRegisterToOperand/>
		<op:BX-DIRegister/>

		<clsf:CreateObject/>

		<cpu:ReturnToNearCaller/>
	</cls:method>
</cls:class>